<!--added into home.html-->
{% extends "base.html" %}

{% block content %}

    {% if validlink %}

        <form class="form-horizontal" action="." method="post">
            {% csrf_token %}
            {% if form.new_password1.errors|length > 0 %}
                <div class="control-group error">
            {% else %}
                <div class="control-group">
            {% endif %}
                <label class="control-label" for="id_new_password1">New password</label>

                <div class="controls">
                    <input type="password" id="id_new_password1" name="new_password1" placeholder="">
                    {% if form.new_password1.errors|length > 0 %}
                        <span class="help-inline">
                            {% for error in form.new_password1.errors %}
                                {{ error|escape }}
                            {% endfor %}
                        </span>
                    {% endif %}
                </div>
            </div>

            {% if form.new_password2.errors|length > 0 %}
                <div class="control-group error">
            {% else %}
                <div class="control-group">
            {% endif %}
                <label class="control-label" for="id_new_password2">Retype password</label>

                <div class="controls">
                    <input type="password" id="id_new_password2" name="new_password2" placeholder="">
                    {% if form.new_password2.errors|length > 0 %}
                        <span class="help-inline">
                            {% for error in form.new_password2.errors %}
                                {{ error|escape }}
                            {% endfor %}
                        </span>
                    {% endif %}
                </div>
            </div>

            <div class="control-group">
                <div class="controls">
                    <button type="submit" class="btn">Change Password</button>
                </div>
            </div>
        </form>
    {% else %}
        <h2>Password reset unsuccessful.</h2>
        <p>The password reset link was invalid, possibly because it already has been
            used. Please request a new password reset.</p>
    {% endif %}

{% endblock %}